<template>
    <div class="log_out">
        <div class="log_out_content">
            <div class="log_out_header">{{ $t('my.退出登录') }}</div>
            <div class="log_out_tips">{{ $t('msg.确定要退出登录吗') }}？</div>

            <div class="log_out_footer">
                <el-button type="primary" @click="submit">{{ $t('live.确定') }}</el-button>
                <el-button type="primary" plain>{{ $t('chat.取消') }}</el-button>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    methods: {
        submit() {
            this.$store.dispatch("LogOut").then(() => {
                this.$router.replace("/login");
            })
        }
    }
}
</script>

<style lang="scss" scoped>
.log_out {
    min-width: 100%;
    min-height: 100%;
    border-radius: 10px 10px 0 0;
    padding: 24px;
    box-sizing: border-box;
    background: #FCFCFE;
    position: relative;

    .log_out_content {
        width: 426px;
        height: 278px;
        padding: 24px;
        box-sizing: border-box;
        background: #FFFFFF;
        box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
        border-radius: 4px 4px 4px 4px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;

        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);

        .log_out_header {
            text-align: center;
            font-weight: bold;
            font-size: 18px;
            color: #333333;
            padding-bottom: 16px;
        }

        .log_out_tips {
            font-size: 16px;
            color: #333333;
        }

        .log_out_footer {
            margin-top: 48px;
            display: flex;
            justify-content: center;

            .el-button {
                width: 118px;
                height: 32px;
            }
        }
    }
}
</style>